import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
//配置路径
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],

  build: {
    rollupOptions: {
      output: {
        entryFileNames: "index.js",
        assetFileNames: "assets/[name][extname]",
        chunkFileNames: "[name].js",
      },
    },
  },

  //配置路径别名
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"),
      vue: "vue/dist/vue.esm-bundler.js",
    },
  },

  optimizeDeps: {
    include: ["dataLocal"], // 将变量名添加到 optimizeDeps 的 include 中，保留，编译时不要占用
  },
});
